import { NgClass, NgFor } from '@angular/common';
import { Component, Input } from '@angular/core';

@Component({
  selector: 'app-starts',
  imports: [NgFor,NgClass],
  templateUrl: './starts.component.html',
  styleUrl: './starts.component.scss'
})
export class StartsComponent {
   stars:boolean[] = [];

   @Input()
   rating: number = 0;
   ngOnInit() {
    for(let i= 0; i<=5; i++) {
      this.stars.push(i >= this.rating);
    }
   }

}
